package com.caesar.Test;

import com.caesar.Practice_enum.TrafficLight;

/**
 * @author caesar
 * @date 2025/7/11
 * @Description:
 * @apiNote
 */
public class TestTrafficLight {
    public static void main(String[] args) {
        TrafficLight light = TrafficLight.RED;
        int i = 10;
        System.out.println(light);
        while (i-- > 0) {
            light = light.nextState();
            System.out.println("第" + (i + 1) + "次\t" + light);
        }
        System.out.println("最后次数：" + light);
    }
}
